package com.c4p.im.session;

import io.netty.channel.Channel;
import io.netty.channel.group.ChannelGroup;
import io.netty.channel.group.DefaultChannelGroup;
import io.netty.util.concurrent.GlobalEventExecutor;

public class MemorySessionStore implements ISessionStore{

    private static ChannelGroup CHANNEL_GROUP = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);

    public ChannelGroup channelGroup(){
        return CHANNEL_GROUP;
    }

    @Override
    public void add(Channel channel) {
        CHANNEL_GROUP.add(channel);
    }

    @Override
    public void remove(Channel channel) {
        CHANNEL_GROUP.remove(channel);
    }

}
